let previewImg = Behavior({
  behaviors: [],
  properties: {
    myBehaviorProperty: {
      type: String
    }
  },
  data: {
    myBehaviorData: {}
  },
  attached: function () {},
  methods: {
    previewImg: function (e) {
      var url = e.currentTarget.dataset.url;
      if (url != null && url != undefined && url.length > 0) {
        wx.previewImage({
          current: url, //当前图片地址
          urls: [url], //所有要预览的图片的地址集合 数组形式
          success: function (res) {},
          fail: function (res) {},
          complete: function (res) {},
        })
      }
    },
  }
})
let previewImgList = Behavior({
  behaviors: [],
  properties: {
  },
  data: {
  },
  methods: {
    previewImgList: function (e) {
      var url = e.currentTarget.dataset.url;
      var images = e.currentTarget.dataset.images;
      if (url != null && url != undefined && url.length > 0) {
        wx.previewImage({
          current: url, //当前图片地址
          urls: images, //所有要预览的图片的地址集合 数组形式
          success: function (res) {},
          fail: function (res) {},
          complete: function (res) {},
        })
      }
    },
  }
})
export {
  previewImg,
  previewImgList
} // 导出